<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        ul,
        ol {
            list-style: none;
        }
    </style>
</head>

<body>
    <form action="">
        <select name="" id="slt">

        </select>
    </form>
    <script>
        var slt = document.getElementById("slt")

        var datas = [1, 2, 3, 4, 5, 6, 7, 8, 9]
        var num = Math.floor(Math.random() * datas.length)

        for (var i = 0; i < datas.length; i++) {

            var opt = document.createElement("option")
            opt.innerText = datas[i]

            if (i == num) {
                opt.selected = true
            }

            slt.appendChild(opt)
        }
    </script>

</body>

</html>